<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <title>修改密码</title>
    <link rel="stylesheet" href="__STATIC__/component/pear/css/pear.css"/>
    {include file='public/head.html'}
</head>
<body class="childrenBody {:dialog_css()}">

<form class="layui-form" action="{:url('profile/password')}" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">旧的密码</label>
        <div class="layui-input-inline">
            <input type="password" name="old_pwd" placeholder="请输入旧密码" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">新的密码</label>
        <div class="layui-input-inline">
            <input type="password" name="new_pwd" placeholder="请输入新密码" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">确认密码</label>
        <div class="layui-input-inline">
            <input type="password" name="re_pwd" placeholder="请确认新密码" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layer-footer">
        <div class="layui-input-inline">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="save">
                <i class="layui-icon layui-icon-ok"></i>
                修改
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>

</form>
<script src="__STATIC__/component/layui/layui.js"></script>
<script src="__STATIC__/component/pear/pear.js"></script>
<script>
    layui.use(['form', 'aphp'], function () {
        let form = layui.form;
        let aphp = layui.aphp;
        form.on('submit(save)', function (data) {
            aphp.request.postForm(data, 0, function () {
                let index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            return false;
        });
    })
</script>
</body>
</html>